System and method for executing a simulation of a constrained multi-body system

ABSTRACT

Methods of and systems for executing a simulation of a constrained multi-body system. The method comprises, using a physics engine, simulating the constrained multi-body system, wherein: the constrained multi-body system comprises articulated constraints, the articulated constraints are associated with a geometric stiffness matrix; the geometric stiffness matrix defining a geometric stiffness; a diagonal approximation of the geometric stiffness matrix is generated; and the diagonal approximation is used as part of a stability analysis in which damping is automatically adjusted so that the damping stabilizes the simulation of the constrained multi-body system.

CROSS-REFERENCE TO RELATED APPLICATION

This United States Non-Provisional Application claims priority from U.S. Provisional Application Ser. No. 62/488,816, filed on Apr. 24, 2017, the entire content of which is incorporated herein by reference.

FIELD

The present technology relates to systems and methods of executing a simulation of a constrained multi-body system. In particular, the systems and methods allow introduction of an adaptive damping scheme to stabilize the simulation of the constrained multi-body system.

BACKGROUND

Physics engines, by allowing physics simulation, are at a cornerstone of many applications, including, but not limited to, real-time simulations such as video games, character animation tolls, operator training, robotics control and the like. A common thread in at least some of these applications is the need for realistic simulation maintaining stable behavior while limiting the processing power required. Limiting the processing power required may be an important aspect for real-time applications wherein an acceptable frame rate has to be maintained.

Simulation of constrained multi-body system systems is a challenge in computer animation. Fast and/or approximate methods have been a research topic since the early days of computer graphics. In some instances, it may be desirable to formulate and solve articulated systems in a minimal set of coordinates, such as joint coordinates. While a few physics engines implement joint coordinate solvers, physics engines commonly include constrained multi-body system solvers. As time stepping a constrained full body formulation may result in constraint violations, most solvers include either a Baumgarte feedback term as further detailed in Baumgarte (BAUMGARTE J.: Stabilization of constraints and integrals of motion in dynamical systems. Computer methods in applied mechanics and engineering 1, 1 (1972), 1-16.), a post step as further detailed in Ascher et al. (ASCHER U. M., PETZOLD L. R.: Computer methods for ordinary differential equations and differential-algebraic equations, vol. 61. Siam, 1998.) and/or fast iterative manifold projection as further detailed in Goldenthal et al. (GOLDENTHAL R., HARMON D., FATTAL R., BERCOVIER M., GRINSPUN E.: Efficient simulation of inextensible cloth. ACM Transactions on Graphics (TOG) 26, 3 (2007), 49.). However, when time steps, velocities, constraint forces and/or mass rations are large, simulations may exhibit large constraint errors and may become unstable.

According to known methods, maintaining stable behavior and acceptable real-time frame rate may require tuning physical parameters such as mass, stiffness and damping in order to produce stable behaviour across a broad range of simulation states. Drawbacks of the know methods may be that accuracy may be sacrificed and/or that the tuning of the physical parameters may require a large amount of manual effort from individuals who have good understanding of physics simulation (i.e., typically physics simulation experts). Attempts have been made to improve stability of simulations, in particular simulations relating to dynamic systems with stiff constraints as such simulations may generate transverse vibrations. One such attempt to, at least partially, address the problem of transverse vibrations generated by simulations of dynamic systems with stiff constraints is a constraint stabilization method proposed by Tournier et al. (TOURNIER M., NESME M., GILLES B., FAURE F.: Stable constrained dynamics. ACM Transactions on Graphics (TOG) 34, 4 (2015), 132.). The constraint stabilization method of Tournier et al. allows for time steps and mass ratios that are several orders of magnitude above the range supported by standard single-step methods. However, the constraint stabilization method of Tournier et al. may present some limits as it may, when being applied to rigid body simulation, introduce numerical issues which may affect efficiency of the simulation and may compromise real-time frame rates. In some instances, the intended physical behavior of the simulation may also be affected by dissipative forces.

Improvements are therefore still desirable.

The subject matter discussed in the background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the background section merely represents different approaches.

SUMMARY

Embodiments of the present technology have been developed based on developers' appreciation of shortcomings associated with the prior art.

In particular, such shortcomings may comprise (1) unrealistic physical behavior of a simulation which may occur under certain circumstances, such as, but not limited to, executing a rigid body simulation; (2) manual operations by individuals who have good understanding of physics simulation may be required to tune certain physical parameters; and/or (3) limitations in maintaining an acceptable frame rate for real-time simulations.

In one aspect, various implementations of the present technology provide a method for executing a simulation of a constrained multi-body system. The method comprises:

using a physics engine, simulating the constrained multi-body system, wherein:

the constrained multi-body system comprises articulated constraints, the articulated constraints are associated with a geometric stiffness matrix; the geometric stiffness matrix defining a geometric stiffness;

a diagonal approximation of the geometric stiffness matrix is generated; and

the diagonal approximation is used as part of a stability analysis in which damping is automatically adjusted so that the damping stabilizes the simulation of the constrained multi-body system.

In another aspect, various implementations of the present technology provide a system for executing a simulation of a constrained multi-body system. The system comprises a processor and a non-transitory computer-readable medium, the non-transitory computer-readable medium comprising control logic which, upon execution by the processor, causes:

operating a physics engine, simulating the constrained multi-body system, wherein:

-   -   the constrained multi-body system comprises articulated         constraints, the articulated constraints are associated with a         geometric stiffness matrix; the geometric stiffness matrix         defining a geometric stiffness;     -   a diagonal approximation of the geometric stiffness matrix is         generated; and     -   the diagonal approximation is used as part of a stability         analysis in which damping is automatically adjusted so that the         damping stabilizes the simulation of the constrained multi-body         system.

In other aspects, various implementations of the present technology provide a non-transitory computer-readable medium storing program instructions for executing a simulation of a constrained multi-body system, the program instructions being executable by a processor of a computer-based system to carry out one or more of the above-recited methods.

In other aspects, various implementations of the present technology provide a computer-based system, such as, for example, but without being limitative, an electronic device comprising at least one processor and a memory storing program instructions for executing a simulation of a constrained multi-body system, the program instructions being executable by the at least one processor of the electronic device to carry out one or more of the above-recited methods.

In the context of the present specification, unless expressly provided otherwise, a computer system may refer, but is not limited to, an “electronic device”, an “operation system”, a “system”, a “computer-based system” and/or any combination thereof appropriate to the relevant task at hand.

In the context of the present specification, unless expressly provided otherwise, the expression “computer-readable medium” and “memory” are intended to include media of any nature and kind whatsoever, non-limiting examples of which include RAM, ROM, disks (CD-ROMs, DVDs, floppy disks, hard disk drives, etc.), USB keys, flash memory cards, solid state-drives, and tape drives. Still in the context of the present specification, “a” computer-readable medium and “the” computer-readable medium should not be construed as being the same computer-readable medium. To the contrary, and whenever appropriate, “a” computer-readable medium and “the” computer-readable medium may also be construed as a first computer-readable medium and a second computer-readable medium.

In the context of the present specification, unless expressly provided otherwise, the words “first”, “second”, “third”, etc. have been used as adjectives only for the purpose of allowing for distinction between the nouns that they modify from one another, and not for the purpose of describing any particular relationship between those nouns.

Implementations of the present technology each have at least one of the above-mentioned object and/or aspects, but do not necessarily have all of them. It should be understood that some aspects of the present technology that have resulted from attempting to attain the above-mentioned object may not satisfy this object and/or may satisfy other objects not specifically recited herein.

Additional and/or alternative features, aspects and advantages of implementations of the present technology will become apparent from the following description, the accompanying drawings and the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

For a better understanding of the present technology, as well as other aspects and further features thereof, reference is made to the following description which is to be used in conjunction with the accompanying drawings, where:

FIG. 1 is a diagram of a computing environment in accordance with an embodiment of the present technology;

FIG. 2 is a diagram of rigid bodies in accordance with embodiments of the present technology;

FIG. 3 is a representation of a simulation and a graph in accordance with embodiments of the present technology;

FIG. 4 is a representation of graphs in accordance with embodiments of the present technology;

FIG. 5 is a representation of a graph in accordance with embodiments of the present technology;

FIG. 6 is a representation of a simulation and a graph in accordance with embodiments of the present technology;

FIG. 7 is a representation of a graph in accordance with embodiments of the present technology;

FIG. 8 is a representation of a simulation and a graph in accordance with embodiments of the present technology;

FIG. 9 is a representation of a simulation in accordance with embodiments of the present technology;

FIGS. 10 and 11 are a representation of a simulation in accordance with embodiments of the present technology; and

FIG. 12 is a diagram illustrating a flowchart illustrating a computer-implemented method implementing embodiments of the present technology.

It should also be noted that, unless otherwise explicitly specified herein, the drawings are not to scale.

DETAILED DESCRIPTION

The examples and conditional language recited herein are principally intended to aid the reader in understanding the principles of the present technology and not to limit its scope to such specifically recited examples and conditions. It will be appreciated that those skilled in the art may devise various arrangements which, although not explicitly described or shown herein, nonetheless embody the principles of the present technology and are included within its spirit and scope.

Furthermore, as an aid to understanding, the following description may describe relatively simplified implementations of the present technology. As persons skilled in the art would understand, various implementations of the present technology may be of a greater complexity.

In some cases, what are believed to be helpful examples of modifications to the present technology may also be set forth. This is done merely as an aid to understanding, and, again, not to define the scope or set forth the bounds of the present technology. These modifications are not an exhaustive list, and a person skilled in the art may make other modifications while nonetheless remaining within the scope of the present technology. Further, where no examples of modifications have been set forth, it should not be interpreted that no modifications are possible and/or that what is described is the sole manner of implementing that element of the present technology.

Moreover, all statements herein reciting principles, aspects, and implementations of the present technology, as well as specific examples thereof, are intended to encompass both structural and functional equivalents thereof, whether they are currently known or developed in the future. Thus, for example, it will be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative circuitry embodying the principles of the present technology. Similarly, it will be appreciated that any flowcharts, flow diagrams, state transition diagrams, pseudo-code, and the like represent various processes which may be substantially represented in computer-readable media and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.

The functions of the various elements shown in the figures, including any functional block labeled as a “processor”, may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. In some embodiments of the present technology, the processor may be a general purpose processor, such as a central processing unit (CPU) or a processor dedicated to a specific purpose, such as a digital signal processor (DSP). Moreover, explicit use of the term a “processor”, a “simulation application” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, application specific integrated circuit (ASIC), field programmable gate array (FPGA), read-only memory (ROM) for storing software, random access memory (RAM), and non-volatile storage. Other hardware, conventional and/or custom, may also be included.

Software modules, or simply modules which are implied to be software, may be represented herein as any combination of flowchart elements or other elements indicating performance of process steps and/or textual description. Such modules may be executed by hardware that is expressly or implicitly shown. Moreover, it should be understood that module may include for example, but without being limitative, computer program logic, computer program instructions, software, stack, firmware, hardware circuitry or a combination thereof which provides the required capabilities.

With these fundamentals in place, we will now consider some non-limiting examples to illustrate various implementations of aspects of the present technology.

FIG. 1 illustrates a diagram of a computing environment 100 in accordance with an embodiment of the present technology is shown. In some embodiments, the computing environment 100 may be implemented by any of a conventional personal computer, a computer dedicated to operating simulation and/or an electronic device (such as, but not limited to, a mobile device, a video game system, a tablet device, etc.) and/or any combination thereof appropriate to the relevant task at hand. In some embodiments, the computing environment 100 comprises various hardware components including one or more single or multi-core processors collectively represented by a processor 110 a solid-state drive 120, a random access memory 130 and an input/output interface 150. The computing environment 100 may be a computer specifically designed for operating simulation engines and/or physics engines. In some alternative embodiments, the computing environment 100 may be a generic computer system.

In some embodiments, the computing environment 100 may also be a sub-system of one of the above-listed systems. In some other embodiments, the computing environment 100 may be an “off the shelf” generic computer system. In some embodiments, the computing environment 100 may also be distributed amongst multiple systems. The computing environment 100 may also be specifically dedicated to the implementation of the present technology. As a person in the art of the present technology may appreciate, multiple variations as to how the computing environment 100 is implemented may be envisioned without departing from the scope of the present technology.

Communication between the various components of the computing environment 100 may be enabled by one or more internal and/or external buses 160 (e.g. a PCI bus, universal serial bus, IEEE 1394 “Firewire” bus, SCSI bus, Serial-ATA bus, ARINC bus, etc.), to which the various hardware components are electronically coupled.

The input/output interface 150 may allow enabling networking capabilities such as wire or wireless access. As an example, the input/output interface 150 may comprise a networking interface such as, but not limited to, a network port, a network socket, a network interface controller and the like. Multiple examples of how the networking interface may be implemented will become apparent to the person skilled in the art of the present technology. For example, but without being limitative, the networking interface may implement specific physical layer and data link layer standard such as Ethernet, Fibre Channel, Wi-Fi or Token Ring. The specific physical layer and the data link layer may provide a base for a full network protocol stack, allowing communication among small groups of computers on the same local area network (LAN) and large-scale network communications through routable protocols, such as Internet Protocol (IP).

According to implementations of the present technology, the solid-state drive 120 stores program instructions suitable for being loaded into the random access memory 130 and executed by the processor 110 for executing a simulation of a constrained multi-body system. For example, the program instructions may be part of a library or an application.

Notation

In FIG. 2, a diagram 200 illustrates coordinate frames and offsets used to specify configuration of a joint 202. A body 204 (also referred to as the body i) and a body 206 (also referred to as the body j) are coupled by the joint 202 with attachment offsets s_(i), s_(j), coordinate frames {u_(i), v_(i), n_(i)} and {u_(j), v_(j), n_(j)} and displacement vector d_(ij). The attachment basis and offsets are fixed to the body 204 and the body 206. The offset relative to the center of mass of body i is specified by s_(i), which is represented in a global coordinate frame but specified by the local vector s′_(i) such that s_(i)= R_(i) s_(i). Similarly, orthogonal basis {u_(i), v_(i), n_(i)} are vectors in the global coordinate frame, but specified by a local basis {u′_(i), v′_(i), n′_(i)} and transformed by R_(i). The dependence on a body orientation is relevant for deriving geometric stiffness matrices, such as the geometric stiffness matrices detailed below in connection with the section entitled Constraint library. Unless otherwise stated vector quantities are represented in a global coordinate frame. Table 1 illustrated below provides an overview of variables and notation used throughout the present document.

TABLE 1 Variables and notation used throughout this document. p_(i) position of body i θ_(i) orientation of body i {dot over (p)}_(i) linear velocity of body i ω_(i) angular velocity of body i x_(i) spatial configuration of body i, such that x_(i) = (p_(i) ^(T) θ_(i) ^(T))^(T) x configuration of all bodies as (x₀ ^(T) x₁ ^(T) . . . x_(n) ^(T))^(T) v velocity of all bodies as ({dot over (p)}₀ ^(T) ω₀ ^(T) . . . {dot over (p)}_(n) ^(T) ω_(n) ^(T))^(T) R_(i) rotation matrix corresponding to the orientation θ_(i) s′_(i) joint attachment offset in local frame s_(i) joint attachment offset in the global frame, s_(i) = R_(i)s′_(i) ϕ a position level constraint equation J ${a\mspace{14mu} {constraint}\mspace{14mu} {Jacobian}\mspace{14mu} {matrix}},{{{such}\mspace{14mu} {that}\mspace{14mu} J} = \frac{d\; \varphi}{dx}}$ J Jacobian matrix for all constraints {tilde over (K)} geometric stiffness matrix {circumflex over (•)} skew-symmetric cross product matrix of a vector □₊ an implicit term or quantity

Geometric Stiffness

In one aspect of the present technology, geometric stiffness may be defined as a tensor encoding variations in constraint force directions. In some embodiments, the tensor may have the following form:

$\begin{matrix} {\overset{\sim}{K} = {\frac{\partial J^{T}}{\partial x}{\lambda.}}} & (1) \end{matrix}$

In this equation, J is a matrix of constraint Jacobians, X are constraint forces and x are positions and orientations of bodies in a simulation. Tournier et al. (TOURNIER M., NESME M., GILLES B., FAURE F.: Stable constrained dynamics. ACM Transactions on Graphics (TOG) 34, 4 (2015), 132.), the entirety of which is hereby incorporated by reference in jurisdictions where such incorporation is permissible, introduces the term geometric stiffness as an implicit stiffness in the velocity-level discretization of the constrained dynamical equations:

$\begin{matrix} {{\begin{pmatrix} \overset{\sim}{M} & {- J^{T}} \\ J & {\frac{1}{h^{2}}C} \end{pmatrix}\begin{pmatrix} v_{+} \\ {h\; \lambda_{+}} \end{pmatrix}} = \begin{pmatrix} {p + {hf}} \\ {{- \frac{1}{h}}\varphi} \end{pmatrix}} & (2) \end{matrix}$

In this equation, {tilde over (M)}=M−h²{tilde over (K)}, p=Mv is a current momentum, f contains external forces, diagonal regularization matrix C makes constraints compliant and h is the time step size. Forming a Schur complement of the upper left block of the equation gives the following reduced system:

$\begin{matrix} {{\left( {{\frac{1}{h^{2}}C} + {J{\overset{\sim}{M}}^{- 1}J^{T}}} \right)h\; \lambda}+={{{- \frac{1}{h}}\varphi} - {J{{\overset{\sim}{M}}^{- 1}\left( {p + {hf}} \right)}}}} & (3) \end{matrix}$

The reduced system above may be similar to the one used by some open source and/or commercial rigid body physics engines (such as, but not limited to, Bullet, Open Dynamics Engine, Havok, Simmechanics™ from Matlab and Vortex™ from CM Labs). The reduced system above typically requires solving a mixed linear complementarity problem (MLCP) as the system may include both bilateral and unilateral constraints. As it may be appreciated by the person skilled in the art of the present technology, inclusion of geometric stiffness in equations (2) and/or (3) may lead to numerical difficulties upon solving linear systems. In some instances, such difficulties may relate to symmetry, positive definiteness and/or efficiency.

With respect to difficulties relating to symmetry and positive definiteness, in some instances, solving the dense linear system (3) may involve a Cholesky factorization. This may require {tilde over (M)} to be symmetric and positive definite. This may also be a similar requirement for the system (2). However, inclusion of {tilde over (K)} may result in a non-symmetric matrix. Tournier el al. suggests that a symmetric approximation of the matrix may be formed with little effect on stabilizing properties. However, the resulting matrix may still fail to meet positive definite requirement of the numerical method. Alternative approaches comprise Teran et al. (TERAN J., SIFAKIS E., IRVING G., FEDKIW R.: Robust quasistatic finite elements and flesh simulation. In Proceedings of the 2005 ACM SIGGRAPH/Eurographics symposium on Computer animation (2005), ACM, pp. 181-190.).), the entirety of which is hereby incorporated by reference in jurisdictions where such incorporation is permissible, which describes a method for enforcing positive definiteness by clamping eigenvalues of a diagonalized elastic deformation gradient to be non-negative. This method may lead to robust simulations but can be costly and therefore may make the method not well suited for real-time and/or performance-focused applications.

With respect to difficulties relating to efficiency, solving the reduced system of equation (3) may require forming an inverse of {tilde over (M)}. For a block diagonal mass matrix, which may be typically the case, this may be done efficiently by inverting linear mass and performing a fast 3×3 inversion of an inertia of each body. However, with inclusion of geometric stiffness, inverting the full mass matrix may no longer be straightforward due to nonzero terms that may appear outside the block diagonal.

To, at least partially, overcome some of the above-discussed difficulties, the present technology provides alternate formulations of geometric stiffness and inclusion of the alternate formulations of the geometric stiffness in multibody equations. As further discussed in the paragraphs below, the inverse of {tilde over (M)} may be obtained more efficiently by using low rank updates. In addition, the present technology also provides using diagonalization of the geometrix stiffness matrix as part of a stability analysis. This aspect with also be discussing in the paragraphs below.

Inverse by Low Rank Updates

Some aspects of the present technology relate to a method of constructing an inverse of {tilde over (M)} using low rank updates. In some circumstances, an unmodified matrix may be relatively efficiently inverted due to a nearly diagonal form of M. However, inverting an augmented mass matrix may require more computational effort (e.g., a lower upper (LU) decomposition) due to off-diagonal elements in a geometrical stiffness matrix.

It should be appreciated that in many instances, geometric stiffness matrix associated with articulated rigid body constraints are sparse and low rank. In some embodiments of the present technology, these properties may be exploited to build an augmented mass matrix more efficiently. In some embodiments, an approach to build the augmented mass matrix may be based on the Sherman-Morrison formula as described in Sherman et al. (SHERMAN J., MORRISON W. J.: Adjustment of an inverse matrix corresponding to a change in one element of a given matrix. The Annals of Mathematical Statistics 21, 1 (1950), 124-127.), the entirety of which is hereby incorporated by reference in jurisdictions where such incorporation is permissible.

Example 1: Decomposition for a Simple Joint

This first example aims at presenting the decomposition associated with a simple articulated joint, in this example, a ball-and-socket. In this example, a geometric stiffness matrix associated with the simple articulated joint is as follows:

$\begin{matrix} {{\overset{\sim}{K}}_{bs} = {\begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & {\hat{\lambda}{\hat{s}}_{i}} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & {{- \hat{\lambda}}{\hat{s}}_{j}} \end{pmatrix} \in {\mathbb{R}}^{12 \times 12}}} & (4) \end{matrix}$

In the geometric stiffness matrix (4), λ∈

³ are the Lagrange multipliers enforcing the constraint. As it may be appreciated by the person skilled in the art of the present technology, the geometric stiffness matrix (4) may be qualified as being sparse and associated with a simple structure. In some embodiments of the present technology, a rank decomposition of {tilde over (K)}_(bs) may be found by examining one of the non-zero blocks of (4) and identifying that s is in a right null space of the matrix {circumflex over (λ)}ŝ.

Starting with a unit vector

${\overset{\rightarrow}{s} = {\frac{s}{\left. ||s \right.||} \in {\mathbb{R}}^{3}}},$

an orthonormal basis may be constructed where:

{right arrow over (s)}⊥{right arrow over (t)}, {right arrow over (r)}⊥{right arrow over (t)}, {right arrow over (r)}⊥{right arrow over (s)},

|{right arrow over (s)}|=|{right arrow over (t)}|=|{right arrow over (r)}|=1.

A column space of {circumflex over (λ)}ŝ spans a subspace formed by vectors {right arrow over (r)} and {right arrow over (t)}. A vector of

Lagrange multipliers may be projected onto this basis, giving the following coefficients:

λ_(r)=λ^(T){right arrow over (r)}

λ_(s)=λ^(T){right arrow over (s)}

λ_(t)=λ^(T){right arrow over (t)}.

As it may be appreciated, {right arrow over (r)}, {right arrow over (s)}, and {right arrow over (t)} are in a row space of the matrix {circumflex over (λ)}ŝ. Its decomposition is therefore a rank-2 matrix which is as follows:

{circumflex over (λ)}ŝ=|s|(λ_(r) {right arrow over (s)}{right arrow over (r)} ^(T)−λ_(s) {right arrow over (r)}{right arrow over (r)} ^(T)+λ_(t) {right arrow over (s)}{right arrow over (t)} ^(T)−λ_(s) {right arrow over (t)}{right arrow over (t)} ^(T))   (5)

This decomposition (5) may be applied to both non-zero 3×3 blocks in the geometric stiffness matrix (4) and used to reconstruct the full matrix {tilde over (K)}_(bs). Knowing a rank decomposition of the matrix {tilde over (K)}_(bs) and being able to compute an inverse mass matrix M⁻¹, if

may become possible to compute an inverse of {tilde over (M)} by applying the Sherman-Morrison formula.

The Sherman-Morrison Formula

Given a rank-1 matrix ab^(T) the Sherman-Morrison formula may be used to update the inverse mass matrix M⁻¹ by:

$\left( {M + {ab}^{T}} \right)^{- 1} = {M^{- 1} - {\frac{M^{- 1}{ab}^{T}M^{- 1}}{1 + {b^{T}M^{- 1}a}}.}}$

An augmented mass matrix {tilde over (M)}⁻¹ may therefore be obtained by sequentially applying rank-1 updates using a geometric stiffness decomposition of all joints in the system.

As an example, we may consider an update to the block of body i using λ_(r) _(i) {right arrow over (s)}_(i){right arrow over (r)}_(i) ^(T), which is the first term in (5). We may define vectors ā, b∈

^(6n) with dimensionality

matching an n body system. These vectors are zero except entries:

a 6i+3 . . . 6i+5=λ_(r) _(i) {right arrow over (s)} _(i)

b 6i+3 . . . 6i+5={right arrow over (r)} _(i).

There vectors are the 3D basis vectors padded with zeros according to block's location in the system matrix. A low rank update of the inverse mass matrix M∈

^(6n×6n) may then be performed by:

$\begin{matrix} \left. \left. M^{- 1}\leftarrow{M^{- 1} + h^{2}} \right.||s||{\frac{M^{- 1}\overset{\_}{a}{\overset{\_}{b}}^{T}M^{- 1}}{1 + {{\overset{\_}{b}}^{T}M^{- 1}\overset{\_}{a}}}.} \right. & (6) \end{matrix}$

The scaling factors −h² and |s| are based on the inclusion of the geometric stiffness in the dynamical equations and length of the attachment offset s. Similar updates may be performed using the rank-1 matrices {right arrow over (s)}{right arrow over (t)}^(T), {right arrow over (r)}{right arrow over (r)}^(T), and {right arrow over (t)}{right arrow over (t)}^(T) and for both bodies. In an embodiment of the present technology, the matrix-vector products of (6) may be computed by exploiting sparsity of the vectors for efficiency purposes. In some embodiments of the present technology, a method to incrementally construct an inverse augmented mass matrix may be similar for other types of joints. Low rank decompositions for joints used in many articulated rigid body simulators may be found in the section “Examples of low rank decompositions for joints used in articulated rigid body simulators” of the present document.

It should be noted that the linear systems of (2) and (3) may not be positive all the time.

Geometric Stiffness Inspired Damping

The present section details a method for diagonalizing {tilde over (K)} so as to result in a positive definite matrix for the linear system. The diagonalized approximation may then be used as part of a stability analysis where damping may be introduced. In some embodiments, the damping may only be introduced when there is an indication that forces related to the geometric stiffness may cause instability.

In some embodiments of the present technology, {tilde over (K)} may not represent a material property of the physical system but it may nonetheless be convenient to interpret a geometric stiffness as a physical spring that is able to generate forces in directions transverse to constraints. In some embodiments, the interpretation may facilitate analysis of the geometry stiffness as part of a mass-spring system of undamped harmonic oscillators.

In order to illustrate an embodiment of the present technology, an example of a simple harmonic oscillator system will be detailed. Stability requirements for simulating the simple harmonic oscillator system is considered with a semi-implicit integration scheme which may also be referred to as symplectic Euler. The stability requirements may then be applied to an integrator with less strict stability requirements, such as a single step implicit integrator that is commonly used by interactive computer graphics applications. A stability criterion for stable simulation is derived and is extended to a dynamical system where spring forces are generated by the geometric stiffness, with the {tilde over (K)} matrix serving as an indicator of when the system may become instable. Thus, damping may be introduced to stabilize the system using an adaptive method (i.e., an adaptive damping scheme) which estimates a damping coefficient that may be large enough to stabilize the system.

Stability Analysis of Harmonic Oscillator

As an example, we consider a behavior of a ID Hookean mass-spring-damper attached to a particle. Accelerations generated by such a dynamical system may be as follows:

{umlaut over (x)}=(−kx−b{dot over (x)})/m   (7)

Where x is a displacement from rest length, {dot over (x)} is a particle velocity, k is a stiffness, b is a damping and m is a mass of the particle. Simulating the dynamical system with a semi-implicit integrator and time step h gives the following velocity and position update:

{dot over (x)}←{dot over (x)}+h{umlaut over (x)},

x←x+h{dot over (x)}.

Substituting (7) and representing updates in matrix form gives the following space equation:

$\begin{matrix} \left. \begin{pmatrix} x \\ \overset{.}{x} \end{pmatrix}\leftarrow{\underset{\underset{P}{}}{\begin{pmatrix} {1 - {h^{2}\frac{k}{m}}} & {h - {h\frac{b}{m}}} \\ {{- h}\frac{k}{m}} & {1 - {h\frac{b}{m}}} \end{pmatrix}}\begin{pmatrix} x \\ \overset{.}{x} \end{pmatrix}} \right. & (8) \end{matrix}$

With the eigenvalues of matrix P given by:

$- \frac{{h^{2}k} + {bh} - {{2m} \pm \sqrt{{h^{4}k^{2}} + {2{bh}^{3}k} + {b^{2}h^{2}} - {4h^{2}{km}}}}}{2m}$

If the magnitude of either eigenvalue is greater than 1, then the simulation may become unstable.

As it may be appreciated from a review of (8), multiple parameters may affect simulation stability. Mass, stiffness and time step may be typically fixed due to application or model requirements. Therefore, in some embodiments of the present technology, only damping may be used to stabilize the dynamical system. In some embodiments of the present technology, non-constitutive damping may be used to stabilize the simulations. In some approaches, non-constitutive damping may be tuned by manually tuning damping coefficients. This may be cumbersome since values must be selected that minimally affect the dynamics, yet leave the simulation stable for a wide range of configurations. To address, at least some of the drawbacks of the manual approach, some embodiments of the present technology rely on an automatic method for computing damping based on a stability region of a semi-implicit integrator.

In some embodiments of the present technology, a single step backward Euler method with a linear approximation of the constraint Jacobian and mass matrix is used. The backward Euler method may bring stability to the simulation with a region of stability which may contain that of the semi-implicit integrator used in the analysis set forth above. Semi-implicit Euler may exhibit absolute stability when the eigenvalues of a phase space linear system lie within a negative real half of a complex plane. This is the region of stability for the integration method whereas backward Euler may have absolute stability for all but a small region in a positive real half of the complex plane. In some embodiments of the present technology, the present technology proposes a stability criterion based on an integrator with a smaller region of stability and then apply it to an implicit integrator. In some embodiments, the stability criterion may come in the form of a threshold based on a behavior of a simple ID undamped oscillator.

Stability Threshold

In some embodiments, a stability criterion (also referred to as a “stability threshold”) may be determined by setting b=0 in eigenvalue equations, giving an undamped oscillator. This may result in the following stability inequality:

$\begin{matrix} {{\frac{{h^{2}k} - \sqrt{{h^{4}k^{2}} - {4h^{2}{km}}}}{m} \leq 4},} & (9) \end{matrix}$

The stability inequality (9) may be true of eigenvalue magnitudes are less than 1.

Alpha Parameter

In some embodiments of the present technology, the stability inequality (9) may be augmented with a parameter α which is a positive scalar value that allows control over how close dynamical system may be to the boundary before damping may be required. This gives the following inequality:

$\begin{matrix} {\frac{h^{2}k}{m} \leq {4{\alpha.}}} & (10) \end{matrix}$

In some embodiments, if the inequality (10) is violated, then the damping required may be found by solving for b at the boundary. This may be computed as:

$\begin{matrix} {b = {\frac{{h^{2}k} - {4\alpha \; m}}{2h}.}} & (11) \end{matrix}$

For a spring system with constant mass and stiffness, the value of b may also be constant. However, if the spring parameters are estimated from the geometric stiffness, the damping values may change at each time step. The stability threshold may also vary with the constraint forces. In some embodiments, for the purpose of stabilizing a general class of physics simulation, a stability threshold may be evaluated at each time step and damping values may be computed according to the equation (11) thereby providing an adaptive damping scheme.

In some embodiments, the above analysis may be extended to the {tilde over (K)} matrix. In some embodiments, the geometric stiffness is associated with the {tilde over (K)} matrix. Therefore, in some embodiments, a geometric stiffness matrix may be referred to as the {tilde over (K)} matrix. In some instances, modal analysis may require finding eigenvalues of a matrix M⁻¹{tilde over (K)} which may be computationally costly. As a result, in some embodiments, the present technology proposes an approximation of the matrix thereby rendering the stability analysis less costly computationally-wise. If the {tilde over (K)} matrix is diagonal, then the damping scheme for stabilizing a simple harmonic oscillator may be applicable.

Diagonalizing the {tilde over (K)} Matrix

The present section provides details on how a diagonal approximation simplifying a stability analysis may be computed, in accordance with embodiments of the present technology. One objective of the approach may be to compute a simplified matrix for use as a stability criterion. In some embodiments, the geometric stiffness may be interpreted as a transient spring. In some embodiments, mechanical work done by the {tilde over (K)} matrix may be considered in building a diagonal approximation K_(d). An instantaneous transfer of mechanical energy occurring over a single time step, or also referred to as “instantaneous work”, done by the geometric stiffness may be 0.5v^(T)

v.

In some embodiments, a diagonal approximation may represent a spring that tends to do at least a same amount of mechanical work, by providing a stiffer system in directions of any typical v. An approximation that tends to upper bound the work may be computed by assigning each diagonal element K_(di,i) norm of a corresponding column vector in {tilde over (K)}, such that:

K _(di,i) =|{tilde over (K)} _(i)|.   (12)

Once a diagonal approximation of the geometric stiffness matrix is generated, a stability analysis may be conducted more easily. In some embodiments, in an inertial coordinate frame, it may become a matter of assigning mass and stiffness values and apply equation (11) to compute entry B_(i,i) of the diagonal damping matrix, the mass and stiffness values being as follows:

m=M_(i,i)

k=K_(di,i)

In some embodiments, this may be done for all degree-of-freedoms (DOFs), although, in some embodiments, damping coefficients corresponding to translational DOFs may be (but not necessarily) sometimes discarded. An augmented mass matrix may then be rebuilt as the following equation:

{tilde over (M)}=M+hB _(;)   (13)

Equation (13) may be positive definite since M may be positive definite and B may contain only non-negative values along the diagonal. In this embodiment, B may be seen as replacing the geometric stiffness matrix. As the damping coefficients may augment the mass and inertia of bodies in the system, it may also be referred to the above approach as an “inertial damping” formulation.

Projection to Constraint Space

In some alternative embodiments, damping may be applied to constraint rows of a linear system. Such approach may stabilize in directions that may be aligned with constraint axes. In some cases, simulations may appear more plausible when damping is applied to constraint equations. This may be achieved by mapping the mass and diagonalized geometric stiffness matrix to a constraint space and performing a stability analysis there. The mass M and the diagonal approximation K_(d) may be mapped onto each constraint row by:

m′=(JM ⁻¹ j ^(T))⁻¹

k′=(JK _(d) ⁻¹ J ^(T))⁻¹,

Where J is the Jacobian for a single constraint equation and m′ and k′ are effective mass and stiffness, respectively, for the constraint. Coupling of constraints through the mass and stiffness matrix may be ignored. In some embodiments, rather than form an effective mass and stiffness using a full constraint matrix, J may simply be a row vector. This may result in a single scalar value for m′ and k′. Stability analysis may be performed using m′ and k′ by applying the equation (11) to compute a damping coefficient, bfor the constraint. However, a constraint damping term may not be considered by the dynamical equations (2). In such circumstances, the formulation may be modified to support constraint damping.

Constraint Space Damping

In some embodiments, constraint equations may be reorganized as a force equation for a spring-damper system to define the following equation:

λ₊ =−C ⁻¹ϕ₊ −B′ϕ ₊  (14)

Where B′ may be a diagonal matrix of non-negative damping coefficients which may be assembled from the b′ computed for each constraint row. Substituting Jv₊=ϕ₊ and letting ϕ₊=ϕ+hϕ₊, the constraint equations may become:

$\begin{matrix} {{{Jv}_{+} + {\Sigma\lambda}_{+}} = {{- \Gamma}\frac{\varphi}{h}}} & (15) \end{matrix}$

Where non-zero entries of the diagonal matrices Σ and Γ may be computed as:

$\begin{matrix} {\Gamma_{i,i} = \frac{1}{\left( {1 + {h^{- 1}C_{i,i}}} \right)B_{i,i}^{\prime}}} & (16) \\ {\Sigma_{i,i} = \frac{h^{- 2}C_{i,i}}{\left( {1 + {h^{- 1}C_{i,i}}} \right)B_{i,i}^{\prime}}} & (17) \end{matrix}$

This may be related to how constrained multibody simulators may allow combination of compliant constraints and Baumgarte stabilization to be interpreted as an implicit stiff spring and damper.

Turning now to FIG. 3, a simulation 302 of a heavy ball (i.e., a 100 Kg load) attached to a flexible cable being dropped and beginning swinging with a pendulum motion is illustrated. A first graph 304 shows kinetic energy when simulated using the method of Tournier et al. according to a first plot 306 and using the method of the present technology according to a second plot 308.

Turning now to FIG. 4, a second graph 402 and a third graph 404 illustrate instantaneous work at each frame using an original geometric stiffness matrix and a diagonal approximation of the original geometric stiffness matrix to simulate the heavy ball of FIG. 3 using hinge joints (the second graph 402) and a flexible cable joint (the third graph 404). FIG. 4 demonstrates that the approximation set forth above in connection with the equation (12) bounds the instantaneous work. For rotational joints, such as a hinge, the diagonal approximation tends to match the instantaneous work relatively closely, whereas for examples modeled using a flexible cable joint, the instantaneous work may be somehow overestimated but nonetheless achieves the goal of upper bounding the work done by {tilde over (K)}.

Turning now to FIG. 5, a fourth graph illustrating performance gains when using low rank updates to compute {tilde over (M)}⁻¹ . As it may be appreciated, for angular joints, the gain may appear to scale linearly with the number of joints, in accordance with table 2 below illustrating an average time to compute {tilde over (M)}⁻¹ for a cable using various numbers of ball-and-socket joints.

TABLE 2 Number of joints Method 10 50 100 Full rank 0.099 ms 6.795 ms 49.668 ms Low rank 0.010 ms 0.517 ms 2.633 ms Gain 9.81× 13.13× 18.87×

Turning now to FIG. 6, a scene 600 represents a character with super strength 602 preventing a tank 604 from driving away. The scene 600 involves many different joints, including hinges, ball-and-sockets, prismatic and flexible cable joints. FIG. 6 also comprises a fifth graph 606 illustrating performance gains using a low rank inverse for the scene 600. As it may be appreciated, the geometric stiffness matrix for the cable joints is not sparse and, as a result, performance gains may be diminished as a number of joints is increased.

Turning now to FIG. 7, a sixth graph 702 illustrates performance gain and computation time for cables simulated using various numbers of flexible cable joints. A speedup from low rank updates is mitigated due to a non-sparse structure of the geometric stiffness matrix.

Turning now to FIG. 8, a cable attached to a heavy load is represented in multiple states 802. The states 802 illustrate vibrations in the cable when integrated with a small time step and no damping h=1/100,000 s (left) and large time step h=0.01 s with adaptive damping scheme (middle) and without (right). As may be seen from FIG. 8, dynamical behaviour may be better preserved with the adaptive damping scheme. FIG. 8 also illustrates a seventh graph 804 which illustrates damping coefficients of a selected link for the cable simulation of FIG. 3. For less massive objects (10 Kg) stabilization damping is zero for most of the simulation. As the mass increase, more damping is required as constraint forces increase.

Turning now to FIG. 9, scenes 902, 904 and 906 illustrate an overlay of selected frames from a crane simulation in accordance with the present technology. A 100,000 Kg boom is elevated 20 degrees and then dropped. The simulation remains stable for 0.1 s (902), 0.01 s (904) and 0.001 s (906) time steps.

FIG. 10 and 11 illustrate scenes 1002, 1004, 1006, 1008 and 1010 generated by a simulation in accordance with the present technology. An heavy vehicle attached to a nearly inextensible cable is dropped from an end of a crane. The simulation involves very large mass ratios and heterogeneous collection of joints. The simulation remains stable at a time step of 1/60 s. As it may be appreciated, cable dynamics may be better preserved by the adaptive damping scheme of the present technology.

Results and Discussions

This section provides examples of evaluation of some aspects of the present technology. Some examples aim at examining some of the computational gains from using a method of low rank matrix inversion in accordance with the present technology whereas other examples illustrate potential benefits of some embodiments of the adaptive damping approach of the present technology. Results were obtained using an Intel Core i7™3.3 GHz CPI from Intel and a single thread. Unless otherwise stated, time steps used for experiments is h=0.01 s. The physics engine Vortex(tm) from CM Labs has been used for the tests. A linear in accordance with the equation (3) is used for all simulations and solved using a standard Cholesky decomposition. The same linear system may also be solved by LUdecomposition.

Examples illustrated in FIGS. 3 and 8 use a constraint space damping method whereas as other examples are stabilized by inertial damping.

Performance of Low Rank Updates

Three examples are discussed in the paragraphs below to evaluate computational speedup that may be obtained by using low rank updates in accordance with the present technology.

Articulated Chains

A computational time of low rank updates and full rank matrix inversion is compared in FIG. 5. Articulated chains involving various numbers of joints and joints types are

simulated and a computational time required to compute {tilde over (M)}⁻¹ is measured. As indicated by table 2, performance gain grows as a number of joints in the system increases. Likewise, a gain is consistent across hinge, universal and ball-and-socket joints.

Strong Robot

An example involving a heterogeneous collection of joints is shown in FIG. 6. The robot character is modeled using compliant constraints, including 5 ball-and-sockets, 11 universal and 10 hinge joints. Each foot of the robot is anchored to the ground using a hinge joint and each fingertip is attached to an end of the cable using a ball-and-socket joint. Masses range from 0.1 Kg for the finger bodies to 15,000 Kg for the vehicle attached to an opposite end of the cable. The vehicle is driven by a motorized prismatic joint to move it away from the robot. The DOFs in the robot are controlled using implicit PD servos with a set point matching the original pose of the character. This scenario resembles a character animation sequence that might occur in a video game with many different types of joints and large mass ratios. Nevertheless, the simulation remains stable and the motion of the character is smooth.

Flexible Cable Joint

A special joint may be used to model the cable for the scene depicted in FIG. 6. The joint uses several dot-2 constraints, for which the geometric stiffness matrix may be relatively dense. The graph 606 of FIG. 6 shows that performance gains diminish as the number of flexible joints is increased and eventually results in longer computation times. Performance results from these simulations are shown in FIG. 7.

Validation

Evaluation of an adaptive damping method in accordance with the present technology may be conducted by monitoring energy of the system, vibrations in chains and explore the range of damping coefficients for systems with various mass ratios.

Kinetic Energy

Simulation of a pendulum swinging under gravity exchanges potential energy and kinetic energy. If friction and other dissipative elements in the simulation are nominal, the total mechanical energy should be nearly constant. FIG. 3 shows the kinetic energy per time step of a cable with 100 Kg load and pendulum motion. The flexible cable joints have an axial stiffness of 10¹² and bending and torsional stiffness of 10. Using known methods, such as Tournier et al., dissipation caused by geometric stiffness causes a peak kinetic energy to decrease by nearly 40% after 40 seconds of simulation time. When the stability criterion with constraint damping is used, the peak kinetic energy drops by only 2% after the same amount of time, indicating that the mechanical energy in the system is better preserved.

Cable Vibrations

In FIG. 8, vibrations of a cable are visualized when an attached heavy load (in this case 5000 Kg) is dropped straight down and reaches its apex. A simulated behavior with very small time steps and no geometric stiffness or damping is provided for comparison. The vibrations seen when the adaptive damping method in accordance with the present technology is used better represent the observed oscillations in a high fidelity simulation and without the dynamical behavior appears to be over damped.

Damping Coefficients

The graph 804 of FIG. 8 shows the damping coefficients of a selected cable link for the example shown in FIG. 3. The mass is increased from 10 Kg to 100 Kg to 1000 Kg. This may demonstrate that the adaptive damping in accordance with the present technology adapts to constraint forces at a current simulation frame. For smaller masses, damping is only required when load reaches its apex (around frame 160) and constraint forces are largest. As the load increases, damping may be required more often to stabilize the system

Other results discussed below demonstrate that the present technology may also be effective by producing stable and interactive simulations with large mass ratios and/or large time steps.

Crane With Heavy Load

FIG. 10 and 11 shows a 15,000 Kg vehicle attached to a cable being dropped from a crane. The cable is nearly inextensible, with an axial stiffness of 10¹⁰. The mass ratio in the system is similarly large, ranging from 100,000 Kg for the boom to 0.2 Kg for individual cable segments. Despite these challenging parameters, the simulation is stable when integrated using a time step of 1/60 s. The adaptive damping method according to the present technology may help to preserve rich cable dynamics and may be applied to angular velocities of simulation bodies with α=1.0. The articulated linkage of the crane is modeled using hinge joints, whereas the cable uses relaxed rigid joints.

Varying Time Steps

A damping coefficient computed in accordance with the present technology may be dependent on the constraint forces and masses of bodies in the simulation. However, the equation (11) may suggest that the damping coefficient may also be dependent on the time step. FIG. 9 illustrates motion of the crane boon when it is dropped from a 20 degrees angle of elevation. Despite large mass ratios and stiff constraints, the simulation remains stable at time steps of 0.1 s, 0.01 s and 0.001 s. Also, the dynamical behavior in each case may be similar, although for the largest time step value the simulation may not appear to be more damped and may exhibit less high frequency dynamics.

Constraint Space vs Inertial Damping

For cable simulations, artifacts may be observed when using inertial damping formulation. Specifically, there may be dissipation about the torsional axis.

The constraint space damping method in accordance with the present technology may be well suited for 6D rigid and flexible cable joints. In some embodiments, constraint space may be augmented by additional constraint rows with negligible compliance values. This may be done automatically at each time step or manually when the simulation model is being designed.

In some embodiments, articulated simulations may be stabilized by only damping rotational DOFs. For many applications, such as physics-based character animation only hinges, universal and/or ball-and-socket joints may be used to model characters. We may however observe that for mechanisms using the dot-2 constraint, such as the prismatic and the flexible cable joint, applying damping to the translational degrees of freedom may result in a behavior where bodies appear to move through a viscous fluid. For such cases, we may simply discard the translational damping coefficient and we may set B_(i,i)=0 for these DOFs. This may help to prevent viscosity artifacts, especially for cable simulation, but may have similar stabilizing properties.

As it may be appreciated, some aspects of the present technology may provide at least some benefits. Using the geometric stiffness in its diagonal form, a stability criterion may be used to adaptively introduce a minimal amount of damping a three fold may benefit: (i) the system matrix may remain positive definite, permitting more efficient numerical solvers; (ii) the effort of manually tuning artificial damping coefficients may be reduced and (iii) stable simulation systems with unprecedented stiffness and/or mass rations may be possible at real-time frame rates.

Constraint Library

This section contains derivations of the geometric stiffness for a basic set of constraints that may be commonly used in articulated rigid body simulation. Each derivation considers the case of a two body system where the geometric stiffness may be represented by a 12×12 matrix. For succinctness, the 3×3 block structure of theses matrices is exploited.

Basic Partial Derivatives

The instantaneous angular velocity ω of a body and the time derivative of its rotation matrix {dot over (R)} are related by

{circumflex over (ω)}={dot over (R)}R⁻¹.   (18)

We can reinterpret this lemma for small angular displacements ∂θ such that

∂{circumflex over (θ)}=dRR⁻¹,

and post-multiplying by R gives

∂{circumflex over (θ)}R=dR.   (19)

Furthermore, for a vector n∈

³ attached to a rotating body such that n=Rn¹, the spatial derivative of the vector is given by

$\begin{matrix} {\frac{\partial n}{\partial\theta} = {\hat{n}.}} & (20) \end{matrix}$

Equations (19) and (20) may be the building blocks used to derive the geometric stiffness equations for a basic constraint library. Additional mathematical details of rigid body kinematics may be found in Murray et al. (MURRAY R. M., LI Z., SASTRY S. S., SASTRY S. S.: A mathematical introduction to robotic manipulation. CRC press, 1994.), the entirety of which is hereby incorporated by reference in jurisdictions allowing such incorporation.

Ball-and Socket Joint

A balf-and-socket, or spherical, joint connecting bodies i and j constrains two points on the bodies to have the same position while allowing relative angular motion. The constraint equation can be written as

ϕ_(bs) =p _(i) +s _(i) −p _(j) −s _(j)=0.

Rearranging Eq. 18 gives {dot over (R)}={circumflex over (ω)}R, and so She time derivative of the constraint equation can be written as

ϕ_(bs) ={dot over (p)} _(i) −ŝ _(i)ω_(i) −{dot over (p)} _(j) +ŝ _(j)ω_(j),

giving the constraint Jacobian matrix

J _(bs)=(I−ŝ _(i) −I ŝ _(j)).

Its other words,

${\overset{.}{\varphi}}_{bs} = {{J_{bs}\begin{pmatrix} {\overset{.}{p}}_{i} \\ \omega_{i} \\ {\overset{.}{p}}_{j} \\ \omega_{j} \end{pmatrix}}.}$

The constraint forces acting on fee two bodies are

$\begin{matrix} {{{J_{bs}^{T}\lambda_{bs}} = \begin{pmatrix} \lambda_{bs} \\ {{\hat{s}}_{i}\lambda_{bs}} \\ {- \lambda_{bs}} \\ {{- {\hat{s}}_{i}}\lambda_{bs}} \end{pmatrix}},} & (21) \end{matrix}$

where λ_(bs) ∈

³ are the Lagrange multipliers for the ball-and-socket constraint. DiiTerenliaiing Eq. 21 with respect to the spatial configuration of the bodies and applying the chain rule gives

${\frac{{\partial J_{bs}^{T}}\lambda_{bs}}{\partial x} = {{J_{bs}^{T}\frac{\partial\lambda_{bs}}{\partial x}} + {\frac{\partial J_{bs}^{T}}{\partial x}\lambda_{bs}}}},$

where the first term is zero and the second term is the geometric stiffness matrix of the joint, or

${\overset{\sim}{K}}_{bs} = {\frac{\partial J_{bs}^{T}}{\partial x}{\lambda_{bs}.}}$

Expanding this into 3×3 blocks gives

$\begin{matrix} {{\overset{\sim}{K}}_{bs} = {\begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & {{\hat{\lambda}}_{bs}{\hat{s}}_{i}} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & {{- {\hat{\lambda}}_{bs}}{\hat{s}}_{j}} \end{pmatrix}.}} & (22) \end{matrix}$

Noting that s_(i)=R_(i)s′_(i) and s_(j)=R_(j)s′_(j), equation (22) matches the matrix provided in Tournier et al.

Axial Lock

An axial lock constrains the angular motion about a single axis. The constraint Jacobian matrix is the 12 component row vector

J _(n)(0n ^(T) _(i)0−n ^(T) _(i))

where the locked axis of rotation n_(i) is fixed to body i. The geometric stiffness for this constraint is

$\begin{matrix} {{\overset{\sim}{K}}_{{ax},n} = {\begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & {{- \lambda_{ax}}{\hat{n}}_{i}} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & {\lambda_{ax}{\hat{n}}_{i}} & 0 & 0 \end{pmatrix}.}} & (23) \end{matrix}$

Universal Joint

The universal, or Hooke, joint has similar behavior to the spherical joint, but removes a rotational degree of freedom by keeping an axis fixed to body i perpendicular fixed to body j. The constraint equations for this joint can be written as

ϕ_(bs) =p _(i) s _(i) −p _(j) −s _(j)=0

ϕ_(dl,u) =n ^(T) _(i) u _(j)=0

where n_(i) is a unit vector in coordinate frame of body i which should remain orthogonal to unit vector u_(j) in coordinate frame of body j. Since the derivation of ϕ_(bs) is the same as previously discussed, we instead focus on the dot-1 constraint ϕ_(d1). The Jacobian matrix of the dot-1 constraint is

J _(d1,u)=(0({circumflex over (n)} _(i) u _(j))^(T)0−({circumflex over (n)} _(i) u _(j))^(T)).

Note that for vectors a, b∈

³ that âb=−{circumflex over (b)}a and (âb)^(T)=−b^(T)â. The geometric stiffness for the dot-1 constraint is

$\begin{matrix} {{\overset{\sim}{K}}_{{d\; 1},u} = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & \eta & 0 & {- \eta^{T}} \\ 0 & 0 & 0 & 0 \\ 0 & {- \eta} & 0 & \eta^{T} \end{pmatrix}} & (25) \end{matrix}$

where η=λ_(d1)ũ_(j)ñ_(i) and the scalar value λ_(d1) ∈

is the Lagrange multiplier of the- dot-1 constraint at Else previous time step. The geometric stiffness for the universal joint may be assembled as

K _(un) =K _(bs) +K _(d1,u).

Hinge Joint

The hinge, or revolute, joint allows a relative rotation of two bodies about a single axis. The joint behaves much like a universal, but with an additional dot-1 constraint equation

ϕ_(bs) =p _(i) +s _(i) −p _(j) −s _(j)=0

ϕ_(d1,u) =n _(i) ^(T) u _(j)=0

ϕ_(d1,v) =n _(i) ^(T) v _(j)=0

where v_(j) is a unit vector in coordinate frame of body j which is orthogonal to u_(j) and is constrained to be perpendicular to n_(i). The geometric stiffness {tilde over (K)}_(d1,v) for the dot-1 constraint between vector v_(j) and n_(i) is found by applying Eq. 25 and substituting v_(j) or u_(j). The hinge geometric stiffness is then assembled as

{tilde over (K)} _(ni) ={tilde over (K)} _(bs) +{tilde over (K)} _(d1,u) +{tilde over (K)} _(d1,v).

Prismatic Joint

A prismatic joint allows a relative translation between two bodies along a single axis. The constraint equations for this joint can be written as

ϕ_(d1,u)=n_(i) ^(T)u_(j)=0

ϕ_(d1,v)=n_(i) ^(T)v_(j)=0

ϕ_(d1,n)=u_(i) ^(T)n_(j)=0

ϕ_(d2,u)=d_(ij) ^(T)u_(i)=0

ϕ_(d2,v)=d_(ij) ^(T)v_(i)=0

where d_(ij)=p_(i)+s_(i)−p_(j)−s_(j). This joint consists of three ciot-1 constraints (top rows), plas equations ϕ_(d2,u) and ϕ_(d2,v), which are dot-2 constraints, A single Lagrange multiplier is used for each dot-2constraint. which together eliminate relative translation of the bodies along any axes perpendicular to n_(i).

Using ϕ_(d2,u) as an example, which constrains relative motion in the direction u_(i), the Jacobian matrix is

J _(d2,u)=(u _(i) ^(T) u _(i) ^(T)(d _(ij) −s _(i))−u _(i) ^(T) u _(i) ^(T) s)   (26)

with the constraint Jacobian for ϕ_(d2,v) having a similar form. The geometric stiffness matrix fat J_(d2,u) is

$\begin{matrix} {{\overset{\sim}{K}}_{{d\; 2},u} = {{\lambda_{{d\; 2},u}\begin{pmatrix} 0 & {\hat{u}}_{i}^{T} & 0 & 0 \\ {\hat{u}}_{i} & {\left( {{\hat{d}}_{i,j} - {\hat{s}}_{i}} \right){\hat{u}}_{i}} & {\hat{u}}_{i}^{T} & \left( {{\hat{s}}_{j}{\hat{u}}_{i}} \right)^{T} \\ 0 & {\hat{u}}_{i} & 0 & 0 \\ 0 & {{\hat{s}}_{j}{\hat{u}}_{i}} & 0 & {- \left( {{\hat{s}}_{j}{\hat{u}}_{i}} \right)^{T}} \end{pmatrix}}.}} & (27) \end{matrix}$

The matrix {tilde over (K)}_(d2,v) may be found by applying Eq. 27 and substituting v_(i) for u_(i). The geometric matrix for the prismatic joint is competed as

{tilde over (K)} _(pr) ={tilde over (K)} _(d1,u) +{tilde over (K)} _(d1,v) +{tilde over (K)} _(d1,n) +{tilde over (K)} _(d2,u) +{tilde over (K)} _(d2,v).

Rigid Joint

The prismatic joint is augmented with si sixth constrains equation that restricts the translational motion of the bodies, effectively constraining the rotational and translational motion of the two bodies to be file same. This is done using aa additionsal dot-2 constraint.

ϕ_(d2,n)=d_(ij) ^(T)n_(i)=0.

The geometric stiffness matrix of the rigid joint is then computed as

{tilde over (K)}_(6D) ={tilde over (K)} _(pr) +{tilde over (K)} _(d2,u).

Flexible Cable Joint

By choosing small or moderate compliances for the rigid joint, the constraint rows are relaxed and the joint becomes flexible. Compliance and damping values are then selected for each of the three rotational and three translational constrained degrees of freedom to match the behavior of an extensible cable. For example, Eq. 16 and Eq. 17 are tuned in this way for the cable results shown in Section 5.

Low Rank Decompositions

This section provides low rank decompositions of basic constraint library set forth above. All factorizations consider the case of a two body system with 12×12 geometric stiffness matrix, although decompositions for larger systems may be possible.

Ball-and Socket

The low rank factorization of {tilde over (K)}_(bs) follows from the analysis in Section 3.1. The vectors {right arrow over (r)}, {right arrow over (s)}, {right arrow over (t)} and the Lagrange multipliers λ_(r), λ_(s), λ_(t) are used with subscripts to indicate the body index. Using this notation, the decomposition is as follows:

s _(i)=(0{right arrow over (s)}_(i) ^(T)00)^(T)

r _(i)=(0{right arrow over (r)}_(i) ^(T)00 )^(T)

t _(i)=(0{right arrow over (t)}_(i) ^(T)00)^(T)

s _(j)=(000{right arrow over (s)}_(j) ^(T))^(T)

r _(j)=(000{right arrow over (r)}_(j) ^(T))^(T)

t _(j)=(000{right arrow over (t)}_(j) ^(T))^(T)

{tilde over (K)} _(bs) =|s _(i)|(λ_(r) _(i) s _(i) r _(i) ^(T)−λ_(s) _(i) {right arrow over (r)} _(i) {right arrow over (r)} _(i) ^(T)+λ_(r) _(i) s _(i) t _(i) ^(T)−λ_(s) _(i) t _(i) t _(i) ^(T))−|s _(j)|(λ_(r) _(j) s _(j) r _(j) ^(T)−λ_(s) _(j) {right arrow over (r)} _(j) {right arrow over (r)} _(j) ^(T)+λ_(r) _(j s) _(j) t _(j) ^(T)−λ_(s) _(j) t _(j) t _(j) ^(T)).

Axial Constraint

The axial constraint decomposition has the following form:

ū_(i)=(0u_(i) ^(T)00)^(T)

v _(i)=(0v_(i) ^(T)00)^(T)

ū′_(i)=(000u_(i) ^(T))^(T)

v′_(i)=(000v_(i) ^(T))^(T)

{tilde over (K)} _(a)=λ(−ū _(i) v _(i) ^(T) +v _(i) ū _(i) ^(T) +ū′ _(i) v _(i) ^(T) −v′ _(i) ū _(i) ^(T)).

Dot-1 Constraint

The decomposition for the dot-1 constraint follows the Jacobian definition from Eq. 24, using vectors and u_(j). but the decomposition is valid for other vector pairings. The low rank decomposition of the dot-1 geometric stiffness matrix is:

n=(000n_(i) ^(T))^(T)

ū=(0−u_(j) ^(T)00)^(T)

n′=(0−n_(i) ^(T)0n_(i) ^(T))^(T)

ū′=(0−u_(j) ^(T)0u_(j) ^(T))^(T)

K _(d1,u)=λ(u′n ^(T) +n′u ^(T)).

Dot-2 Constraint

Finally, for the dot-2 constraint we begin by forming an orthonormal basis using the vector

${{\overset{\rightarrow}{d}}_{ij} = \frac{d_{ij}}{\left. ||d_{ij} \right.||}},$

such that

{right arrow over (d)}_(ij)⊥{right arrow over (e)}_(ij), {right arrow over (e)}_(ij)⊥{right arrow over (f)}_(ij), {right arrow over (d)}_(ij)⊥{right arrow over (f)}_(ij), |{right arrow over (d)}_(ij)|=|{right arrow over (e)}_(ij)|=|{right arrow over (f)}_(ij)|=1.

This basis, along with the orthonormal bases {right arrow over (r)}_(i), {right arrow over (s)}_(i), {right arrow over (t)}_(i)and {right arrow over (r)}_(j), {right arrow over (s)}_(j), {right arrow over (t)}_(j), is projected onto the constraint coordinate vectors v_(i), and n_(i) giving the coefficients

ρ_(i, n) = {right arrow over (r)}_(i) ^(T) n_(i) ρ_(i, v) = {right arrow over (r)}_(i) ^(T) v_(i) τ_(i, n) = {right arrow over (t)}_(i) ^(T) n_(i) τ_(i, v) = {right arrow over (t)}_(i) ^(T) v_(i) ρ_(j, n) = {right arrow over (r)}_(j) ^(T) n_(i) ρ_(j, v) = {right arrow over (r)}_(j) ^(T) v_(i) τ_(j, n) = {right arrow over (t)}_(j) ^(T) n_(i) τ_(j, v) = {right arrow over (t)}_(j) ^(T) v_(i) υ_(n) = {right arrow over (f)}_(ij) ^(T)n_(i) υ_(v) = {right arrow over (f)}_(ij) ^(T)v_(i) κ_(n) = {right arrow over (e)}_(ij) ^(T)n_(i) κ_(v) = {right arrow over (e)}_(ij) ^(T)v_(i).

We also define the following vectors:

n ₂ = (0 n_(i) ^(T) 0 0)^(T) v ₂ = (0 v_(i) ^(T) 0 0)^(T) n ₃₁ = (−n_(i) ^(T) 0 n_(i) ^(T) 0)^(T) v ₁₃ = (v_(i) ^(T) 0 −v_(i) ^(T) 0)^(T) n ₄₂ = (0 −n_(i) ^(T) 0 n_(i) ^(T))^(T) v ₂₄ = (0 v_(i) ^(T) 0 −v_(i) ^(T))^(T) r _(i) = (0 {right arrow over (r)}_(i) ^(T) 0 0)^(T) t _(i) = (0 {right arrow over (t)}_(i) ^(T) 0 0 )^(T) r _(j) = (0 0 0 {right arrow over (r)}_(j) ^(T))^(T) t _(j) = (0 0 0 {right arrow over (t)}_(j) ^(T))^(T) f _(ij) = (0 {right arrow over (f)}_(ij) ^(T) 0 0)^(T) ē_(ij) = (0 {right arrow over (e)}_(ij) ^(T) 0 0)^(T) c ₁ = −ρ_(j, n) t _(j) + τ_(j, n) r _(j) d ₁ = −ρ_(j, v) t _(j) ++ τ_(j, v) r _(j) c ₂ = ρ_(j, n) v ₂ − ρ_(j, v) n ₂ d ₂ = τ_(j, n) v ₂ − τ_(j, v) n ₂ c ₄ = υ_(n) v ₂ − υ_(v) n ₂ d ₄ = κ_(n) v ₂ − κ_(v) n ₂ c ₅ = ρ_(i, n) v ₂ − ρ_(i, v) n ₂ d ₅ = τ_(i, n) v ₂ − τ_(i, v) n ₂.

The low rank decomposition {tilde over (K)}_(d2,u) becomes

K _(d2,u)=λ( v ₁₃ n ₂ ^(T) +n ₃₁ v ₂ ^(T) +n ₂ v ₁₃ ^(T) +v ₂ n ₃₁ ^(T))+λ|s _(j)|( n ₄₂ d ₁ ^(T) +v ₂₄ c ₁ ^(T) +r _(j) d ₂ ^(T) −t _(j) c ₂ ^(T))+λ|d _(ij)|( f _(ij) d ₄ ^(T) −ē _(ij) c ₄ ^(T))−λ|s _(i)|( r _(i) d ₅ ^(T) −t _(i) c ₅ ^(T)).

Turning now to FIG. 12, a flowchart illustrating a computer-implemented method 1200 of executing a simulation of a constrained multi-body system is illustrated. In some embodiments, the computer-implemented method 1200 may be (completely or partially) implemented on a computing environment similar to the computing environment 100.

The method 1200 comprises using a physics engine simulating the constrained multi-body system. The constrained multi-body system comprises articulated constraints, the articulated constraints are associated with a geometric stiffness matrix. The geometric stiffness matrix defines a geometric stiffness. At a step 1202, the method 1200 executes generating a diagonal approximation of the geometric stiffness matrix. Then, at a step 1204, the diagonal approximation is used as part of a stability analysis in which damping is automatically adjusted so that the damping stabilizes the simulation of the constrained multi-body system.

In some embodiments, the damping is associated with a damping coefficient. The damping coefficient may be automatically adjusted so as to be large enough to stabilize transverse oscillations of the simulation of the constrained multi-body system. In some embodiments, the damping is an adaptive damping, the adaptive damping being associated with damping values calculated at each time step. The damping values may be calculated based on the following equation:

$b = {\frac{{h^{2}k} - {4\alpha \; m}}{2h}.}$

Wherein k is a stiffness, b is a damping and m is a mass, h is a given time step and a is a positive scalar value that allows control over how close dynamical system may be to the boundary before damping may be required.

In some embodiments, the simulation of the constrained multi-body system comprises a dynamical system wherein the geometric stiffness matrix is reinterpreted as a spring and the generated forces are used in combination with a stability criterion for stable simulation. The spring forces may define the damping.

In some embodiments, the stability criterion may comprise a threshold based on a behavior of a simple ID undamped oscillator. The geometric stiffness matrix may serve as the stability criterion as to whether the dynamical system becomes unstable. In some embodiments, the geometric stiffness matrix is a {tilde over (K)} matrix, wherein the {tilde over (K)} matrix is defined as follows:

$\overset{\sim}{K} = {\frac{\partial J^{T}}{\partial x}{\lambda.}}$

Wherein J is a matrix of constraint Jacobians, λ are constraint forces and x are positions and orientations of bodies in the simulation of the constrained multi-body system.

In some embodiments, the diagonal approximation of the geometric stiffness matrix may preserve mechanical work properties associated with the original geometric stiffness matrix. The geometric stiffness may define how forces in the constrained multi-body system change due to instantaneous motion.

In some embodiments, the instantaneous motion comprises at least one of rotation of links associated with the constrained multi-body system, translation of links associated with the constrained multi-body system and relative motion of links associated with the constrained multi-body system.

In some embodiments, a topology of a mechanical structure of the constrained multi-body system may remain unmodified during the simulating of the constrained multi-body system. In some embodiments, the parameters of the damping define an interpretation of the geometric stiffness used in the simulation of the constrained multi-body system. In some embodiments, at least one of the parameters define physical behaviour of a transient physical spring that is able to generate forces in directions transverse to transverse oscillations directions. In some embodiments, the simulating of the constrained multi-body system may be executed in real-time.

In some embodiments, stabilizing the simulation of the constrained multi-body system may comprise stabilizing the transverse oscillations of the simulation of the constrained multi-body system.

In some embodiments, the geometric stiffness matrix may be generated by using a low rank update algorithm, the using of the low rank update algorithm comprising constructing a lead matrix of dynamical equations of motion, the lead matrix comprising the geometric stiffness matrix. The geometric stiffness matrix may model the articulated constraints. In some embodiments, data encoding parameters of the transient spring models a tensor encoding variations in constraint force directions.

As it may be appreciated, a constrained multi-body system may comprise rigid bodies such as the ones illustrated in FIG. 2-11. In some embodiments, a rigid body may be defined as an idealization of a solid body in which deformation is neglected. In other words, a distance between any two given points of a rigid body may remain constant in time regardless of external forces exerted on it. In a constrained multi-body system simulation, constraints may specify how the rigid bodies are allowed to move relative to one another.

As it may be appreciated, a physics engine may compute motions of rigid bodies based on dynamic equations, typically subject to gravity and possibly connected using kinematic constraints also referred to as joints, such as, but not limited to, a hinge or slider constraint. Examples of physics engine may include, but is not limited to, Bullet, Open Dynamics Engine (ODE), Havok, Simmechanics™ from Matlab and Vortex™ from CM Labs.

As it may be appreciated, an articulated constraint may consist of a constraint function defining allowed relative motion between rigid bodies. A derivative of the constraint may be a Jacobian matrix. The derivative of the Jacobian w.r.t. position may be the geometric stiffness matrix in accordance with the present technology.

In some embodiments, forces described by the geometric stiffness may be considered as forces generated by a set of springs in relevant dimensions. Dynamical equations of motion may be rewritten in such a way as to match equations of a spring, thus providing stiffness and damping coefficient of such a spring.

In some embodiments, stability may depend on multiple factors such as mass, stiffness, damping, the time step, and the integration scheme. The stability analysis may assume that a system is linear and may use standard methods to determine a boundary of stability. The stability analysis may be based on the fact that if the magnitude of the Eigen values of the phase space matrix are <1 (for an example of such a matrix, see “P” from equation (8)). We may do this for a simple harmonic oscillator, and for such a simple system the stability may be guaranteed if this condition holds. The present technology may also be applied to more complex systems using an approximation of the geometric stiffness thereby enlarging the region stability.

In some embodiments, the stiffness matrix may be diagonalized to increase performance of the updated mass matrix computation and facilitate convergence analysis. In some embodiment, the implicit damping matrix may be then computed using equation (13).

In some embodiments, “damping”, “adaptive damping” and “adaptive damping scheme” may refer to a method for varying an amount of damping in a damper according to some criterion. In some embodiments, an amount of damping may be different for each degree of freedom and may depend on an amount of tension in system in that degree of freedom, and be only as high as necessary to maintain stability. In some embodiments, the method for varying an amount of damping may mitigate non-constitutive energy dissipation.

While the above-described implementations have been described and shown with reference to particular steps performed in a particular order, it will be understood that these steps may be combined, sub-divided, or re-ordered without departing from the teachings of the present technology. At least some of the steps may be executed in parallel or in series. Accordingly, the order and grouping of the steps is not a limitation of the present technology.

It should be expressly understood that not all technical effects mentioned herein need to be enjoyed in each and every embodiment of the present technology.

Modifications and improvements to the above-described implementations of the present technology may become apparent to those skilled in the art. The foregoing description is intended to be exemplary rather than limiting. The scope of the present technology is therefore intended to be limited solely by the scope of the appended claims. 

What is claimed is:
 1. A computer-implemented method for executing a simulation of a constrained multi-body system, the method comprising: using a physics engine, simulating the constrained multi-body system, wherein: the constrained multi-body system comprises articulated constraints, the articulated constraints are associated with a geometric stiffness matrix; the geometric stiffness matrix defining a geometric stiffness; a diagonal approximation of the geometric stiffness matrix is generated; and the diagonal approximation is used as part of a stability analysis in which damping is automatically adjusted so that the damping stabilizes the simulation of the constrained multi-body system.
 2. The method of claim 1, wherein the damping is associated with a damping coefficient.
 3. The method of claim 1, wherein the damping coefficient is automatically adjusted so as to be large enough to stabilize transverse oscillations of the simulation of the constrained multi-body system.
 4. The method of claim 1, wherein the damping is an adaptive damping, the adaptive damping being associated with damping values calculated at each time step.
 5. The method of claim 4, wherein the damping values are calculated based on the following equation: $b = {\frac{{h^{2}k} - {4\alpha \; m}}{2h}.}$ wherein k is a stiffness, b is a damping and m is a mass, h is a given time step and a is a positive scalar value that allows control over how close dynamical system may be to the boundary before damping may be required.
 6. The method of claim 1, wherein the simulation of the constrained multi-body system comprises a dynamical system wherein the geometric stiffness matrix is reinterpreted as a spring and the generated forces are used in combination with a stability criterion for stable simulation.
 7. The method of claim 6, wherein spring forces define the damping.
 8. The method of claim 6, wherein the stability criterion comprises a threshold based on a behavior of a simple ID undamped oscillator.
 9. The method of claim 8, wherein the geometric stiffness matrix serves as the stability criterion as to whether the dynamical system becomes unstable.
 10. The method of claim 9, wherein the geometric stiffness matrix is a {tilde over (K)} matrix, wherein the {tilde over (K)} matrix is defined as follows: $\overset{\sim}{K} = {\frac{\partial J^{T}}{\partial x}{\lambda.}}$ wherein J is a matrix of constraint Jacobians, λ are constraint forces and x are positions and orientations of bodies in the simulation of the constrained multi-body system.
 11. The method of claim 1, wherein the diagonal approximation of the geometric stiffness matrix preserves mechanical work properties associated with the constrained multi-body system.
 12. The method of claim 1, wherein the geometric stiffness defines how forces in the constrained multi-body system change due to instantaneous motion.
 13. The method of claim 12, wherein the instantaneous motion comprises at least one of rotation of links associated with the constrained multi-body system, translation of links associated with the constrained multi-body system and relative motion of links associated with the constrained multi-body system.
 14. The method of claim 1, wherein a topology of a mechanical structure of the constrained multi-body system remains unmodified during the simulating of the constrained multi-body system.
 15. The method of claim 1, wherein parameters of the damping define an interpretation of the geometric stiffness used in the simulation of the constrained multi-body system.
 16. The method of claim 15, wherein at least one of the parameters define physical behaviour of a transient physical spring that is able to generate forces in directions transverse to transverse oscillations directions.
 17. The method of claim 1, wherein the simulating of the constrained multi-body system is executed in real-time.
 18. The method of claim 1, wherein stabilizing the simulation of the constrained multi-body system comprises stabilizing the transverse oscillations of the simulation of the constrained multi-body system.
 19. The method of claim 1, wherein the geometric stiffness matrix is generated by using a low rank update algorithm, the using of the low rank update algorithm comprising constructing a lead matrix of dynamical equations of motion, the lead matrix comprising the geometric stiffness matrix.
 20. The method of claim 1, wherein the geometric stiffness matrix models the articulated constraints.
 21. The method of claim 16, wherein data encoding parameters of the transient spring models a tensor encoding variations in constraint force directions.
 22. A computer-implemented system for executing a simulation of a constrained multi-body system, the system comprising: a processor; a non-transitory computer-readable medium, the non-transitory computer-readable medium comprising control logic which, upon execution by the processor, causes: operating a physics engine, simulating the constrained multi-body system, wherein: the constrained multi-body system comprises articulated constraints, the articulated constraints are associated with a geometric stiffness matrix; the geometric stiffness matrix defining a geometric stiffness; a diagonal approximation of the geometric stiffness matrix is generated; and the diagonal approximation is used as part of a stability analysis in which damping is automatically adjusted so that the damping stabilizes the simulation of the constrained multi-body system.
 23. A non-transitory computer-readable medium, the non-transitory computer-readable medium comprising control logic which, upon execution by a processor, causes: operating a physics engine, simulating the constrained multi-body system, wherein: the constrained multi-body system comprises articulated constraints, the articulated constraints are associated with a geometric stiffness matrix; the geometric stiffness matrix defining a geometric stiffness; a diagonal approximation of the geometric stiffness matrix is generated; and the diagonal approximation is used as part of a stability analysis in which damping is automatically adjusted so that the damping stabilizes the simulation of the constrained multi-body system. 